package com.jyx.framework.domain.course;

import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.mongodb.core.mapping.Field;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;


@Data
@ToString
@Entity
@Table(name = "course_market")
@GenericGenerator(name = "jpa-assigned", strategy = "assigned")
public class CourseMarket implements Serializable {

    private static final long serialVersionUID = 2861134468814524983L;

    /**
     *  `id` varchar(32) NOT NULL COMMENT '课程id',
     *   `charge` varchar(32) NOT NULL COMMENT '收费规则，对应数据字典',
     *   `valid` varchar(32) NOT NULL COMMENT '有效性，对应数据字典',
     *   `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '过期时间',
     *   `qq` varchar(32) DEFAULT NULL COMMENT '咨询qq',
     *   `price` float(10,2) DEFAULT NULL COMMENT '价格',
     *   `price_old` float(10,2) DEFAULT NULL COMMENT '原价',
     *   `start_time` datetime DEFAULT NULL COMMENT '课程有效期-开始时间',
     *   `end_time` datetime DEFAULT NULL COMMENT '课程有效期-结束时间',
     */
    @Id
    @GeneratedValue(generator = "jpa-assigned")
    private String id;
    private String charge;
    private String valid;
    private String qq;

    private Float price; //价格
    private Float price_old;//原价
    @Field("start_time")
    private Date startTime;
    @Field("end_time")
    private Date endTime;



}

